<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>项目管理</title>
    {% load static %}
    <link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
    <link href="{% static 'css/bootstrap-theme.min.css' %}" rel="stylesheet">
</head>
<body>
    <div class="container mt-5">
        <h1>项目管理</h1>
        <a href="{% url 'add_project' %}" class="btn btn-primary mb-3">添加项目</a>
        <ul class="list-group">
            {% for project in projects %}
                <li class="list-group-item">
                    <a href="{% url 'project_detail' project.pk %}">{{ project.name }}</a>
                    <span class="float-right">
                        {% if project.is_starred %}
                            <i class="fas fa-star"></i>
                        {% else %}
                            <i class="far fa-star"></i>
                        {% endif %}
                    </span>
                </li>
            {% endfor %}
        </ul>
    </div>
    <script src="{% static 'js/jquery.js' %}"></script>
    <script src="{% static 'js/popper.min.js' %}"></script>
    <script src="{% static 'js/bootstrap.min.js' %}"></script>
</body>
</html>